package net.zm123.async;

import io.grpc.Server;
import io.grpc.ServerBuilder;
import net.zm123.sync.RpcSyncServerImpl;

import java.io.IOException;

public class RpcAsyncServerApp {
    public static void main(String[] args) {
        Server server = ServerBuilder.forPort(9998)
                .addService(new RpcAsyncServerImpl())
                .build();
        try {
            server.start();
            server.awaitTermination();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
